﻿using System;
using umbraco.presentation.masterpages;
using Umbraco.Core;



using Umbraco.Core;
using Umbraco.Core.Events;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Publishing;
using Umbraco.Core.Services;


namespace objectOutlet.Umbraco.ConnectedPages.Startup
{
	public class RelationsTabHandler : ApplicationEventHandler
	{
		// http://dejanstojanovic.net/umbraco-cms/2014/march/umbraco-backend-customization-custom-buttons/

		// https://our.umbraco.org/forum/developers/extending-umbraco/6675-Umbraco-tabs

		// https://our.umbraco.org/wiki/reference/umbraco-best-practices/standard-ui-controls/tabview

		public RelationsTabHandler()  
		{
			umbracoPage.Load += umbracoPage_Load;
		}

		void umbracoPage_Load(object sender, EventArgs e)
		{
			var page = sender as umbracoPage;
			var tabView = (page.FindControl("body")).FindControl("TabView1") as TabView;



			umbraco.uicontrols.TabView tbv = new umbraco.uicontrols.TabView();

			// Hvis en node har relations, så laver vi en tab "Relations/Relationer" som viser disse		
		}  
	}
}